﻿namespace c_practise;

class MyFunction
{
    static void Main()
    {
        //系数
        int[] Coefficient = { 9, 8, 7 };
        //取得输入
        Console.WriteLine("请输入两个数字，以逗号隔开，以回车结束：");
        string input = Console.ReadLine();
        string[] inputs = input.Split(new char[] { ',', '，', '\n' }, StringSplitOptions.RemoveEmptyEntries);
        int[] numbers = new int[inputs.Length];
        for (int i = 0; i < inputs.Length; i++)
        {
            numbers[i] = Convert.ToInt32(inputs[i]);
        }
        //输出
        Console.WriteLine(Compute(Coefficient,numbers));

    }
    private static int Compute(int[] coff, int[] input)
    {
      return coff[0]*input[0]*input[0]+ coff[1] * input[1] * input[1]+ coff[0] * coff[1] * input[0]+ input[1] + coff[2];
    }
}
